package cn.yuanqiao.archive.storeRoom.mapper;

import cn.yuanqiao.archive.appManager.domain.DataScopeBase;
import cn.yuanqiao.archive.storeRoom.domain.OutInLogs;
import cn.yuanqiao.common.annotation.DataScope;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 出入库日志Mapper接口
 * 
 * @author xy
 * @date 2023-06-30
 */
@Mapper
public interface OutInLogsMapper 
{


    /**
     * 查询出入库日志
     * 
     * @param id 出入库日志主键
     * @return 出入库日志
     */
    public OutInLogs selectOutInLogsById(Long id);

    /**
     * 查询出入库日志列表
     * 
     * @param outInLogs 出入库日志
     * @return 出入库日志集合
     */
    @DataScope(deptAlias = "b", userAlias = "a",deptColumn = "DEPT_ID",userColumn = "CREATOR")
    public List<OutInLogs> selectOutInLogsList(@Param("dataScopeBase") DataScopeBase dataScopeBase, @Param("outInLogs")OutInLogs outInLogs);

    /**
     * 新增出入库日志
     * 
     * @param outInLogs 出入库日志
     * @return 结果
     */
    public int insertOutInLogs(OutInLogs outInLogs);

    /**
     * 修改出入库日志
     * 
     * @param outInLogs 出入库日志
     * @return 结果
     */
    public int updateOutInLogs(OutInLogs outInLogs);

    /**
     * 删除出入库日志
     * 
     * @param id 出入库日志主键
     * @return 结果
     */
    public int deleteOutInLogsById(Long id);

    /**
     * 批量删除出入库日志
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOutInLogsByIds(Long[] ids);

    @DataScope(deptAlias = "b", userAlias = "t1",deptColumn = "DEPT_ID",userColumn = "CREATOR")
    public List<OutInLogs> getInList(@Param("dataScopeBase") DataScopeBase dataScopeBase, @Param("outInLogs") OutInLogs outInLogs);
}
